Math.Sqrt(Value)
.Sqrt() method returns the square root of a number.
Applies To
Description
Math.Sqrt() method returns the square root of a number.
The Functions and Operators equivalent is SQRT(nExpression).
Properties and Methods
None
Available
The .Sqrt(Value) method is available in:
- 15.03.016
- All newer builds
Type
Decimal
Syntax
Math.Sqrt(Value);
Parameters
Parameter |
Required |
Description |
---|---|---|
Value |
Yes |
Any data that can be evaluated as a number >= 0. If the value cannot be evaluated as a number, then DEACOM will throw a scripting error. |
Example
Event.Form.MessageBox('Math.Sqrt(0): ' + Math.Sqrt(0) +
'\nMath.Sqrt(16): ' + Math.Sqrt(16) +
'\nMath.Sqrt(100): ' + Math.Sqrt(100) +
'\nMath.Sqrt((3 * 3) + (4 * 4)): ' + Math.Sqrt((3 * 3) + (4 * 4)));
/* Expected System Prompt Display:
Math.Sqrt(0): 0
Math.Sqrt(16): 4
Math.Sqrt(100): 10
Math.Sqrt((3 * 3) + (4 * 4)): 5
*/